<html>
  <head>
    <link rel="shortcut icon" href="/favicon.ico" type="image/vnd.microsoft.icon">
    <link rel="stylesheet" type="text/css" href="/iq.css">
{% block links %}
    <link rel="alternate" type="application/atom+xml" title="Atom" href="{{ request.application_url|escape }}/feed">
{% endblock %}
    <script src="/MochiKit.js"></script>
    <script src="/iq.js"></script>
{% if testing %}
    <script>addLoadEvent(partial(createLoggingPane, true));</script>
{% endif %}
    <title>IQ: {% block subtitle %}Accounting for Taste{% endblock %}</title>
  </head>
  <body>
    <div id="header" class="roundtop">
      <div id="logo">
        <a href="/">
          <img src="/large/iq.png">
        </a>
      </div>
      <div id="search">
        <form method="GET" action="/search">
          <input type="text" name="q" size="32" value="{{search_query|escape}}">
          <input type="submit" value="Search">
        </form>
      </div>
      <div style="height: 79px">&nbsp;</div>
{% block user %}
      <div id="user" class="nav">
{%   if account.trusted %}
        <span id="user_control">{{ account.name }} &#9662;</span>
        <div id="user_menu" style="display: none">
          <a id="signout_button" href="/logout">
            Sign out
          </a>
        </div>
{%   else %}
        <span id="user_control">Sign In &#9662;</span>
        <div id="user_menu" style="display: none">
          <div id="signin_form">
            <table>
              <tr>
                <td>
                  Account
                  <input id="signin_account" tabindex="1" type="text" name="name" size="12">
                  <br>
                  <a href="/create-account">Want to create a new account?</a>
                </td>
                <td>
                  Password
                  <input id="signin_password" tabindex="2" type="password" name="password" size="12">
                  <br>
                  <a href="/reset-password">Forgot your password?</a>
                </td>
                <td>
                  <div id="signin_button" class="round">
                    Ok
                  </div>
                </td>
              </tr>
              <tr>
                <td id="signin_status" colspan="2">
                  <div id="signin_throbber" class="throbber">&nbsp;</div>
                  <div id="signin_status_message"></div>
                </td>
              </tr>
              <tr>
                <td colspan="2">
                  <a style="font-size: medium" href="{{ google_signin }}">Sign in with a Google account</a>
                </td>
              </tr>
            </table>
          </div>
        </div>
{%   endif %}
      </div>
{%   if account.isAdmin %}
      <a id="admin_nav" class="nav" href="/admin">Admin</a>
{%   endif %}
{% endblock %}
      <div id="navbar">
        <div id="browse_control" class="nav">
          Quotes &#9662;
          <div id="browse_menu" style="display: none">
            <a href="/browse">Recent</a>
{% if account.trusted %}
            <a href="/browse?page={{ my_page.encode|urlencode }}">My Quotes</a>
            <a href="/browse?page={{ draft_page.encode|urlencode }}">My Drafts</a>
{% endif %}
          </div>
        </div>
{% if account.trusted %}
        <div class="nav">
          <a href="/submit">Create New</a>
        </div>
{% endif %}
      </div>
      <div id="headline">
{% ifequal stability_level "0" %}
        <div id="headline_alpha" class="rounded">
          This system is in an <em>alpha</em> state.
          Anything and everything could and probably will break.
        </div>
{% endifequal %}
{% ifequal stability_level "1" %}
        <div id="headline_beta" class="rounded">
          This system is in a <em>beta</em> state.  There may be some bugs here and there.
        </div>
{% endifequal %}
      </div>
    </div>
    <div id="content_container">
      <div id="content">
{% if exception %}
      <div class="error">{{ exception }}</div>
{% endif %}
{% block content %}
&nbsp;
{% endblock %}
      </div>
      <div id="footer">
{% block footer %}
        Join our IRC channel!  #ircquotes at irc.endernet.org.
        <br>
        Did you find a bug, or do you have an idea for a feature?
        Submit it to our <a href="http://code.google.com/p/ircquotes/issues">issue tracker</a>!
        <br>
        If you have more general comments, suggestions, or questions, please email
        <a href="mailto:help@ircquotes.com">help@ircquotes.com</a>.
        <br>
        Server software: {% include "RELEASE" %}
{% endblock %}
      </div>
    </div>
  </body>
</html>

